export function useTabbarConfig(){
	
	const winWidth = ref(0);
	const winHeight = ref(0);
	const tabbarConfig = computed(() => {
		if(winWidth.value > 1000){
			return {
				height: '160rpx',
				iconSize: '80rpx',
				textSize: '34rpx'
			}
		}
		
		return {
			height: '60px',
			iconSize: '26px',
			textSize: '14px'
		}
	})
	
	const windowResizeCallback = (res) => {
		winWidth.value = res.size.windowWidth;
		winHeight.value = res.size.windowHeight;
	}
	
	onMounted(() => {
		const systemInfo = uni.getSystemInfoSync();
		winWidth.value = systemInfo.windowWidth;
		winHeight.value = systemInfo.windowHeight;
		uni.onWindowResize(windowResizeCallback)
	})
	
	return {
		winWidth,
		winHeight,
		tabbarConfig
	}
}